import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/signin',
    method: 'post',
    data
  })
}
// axios.defaults.headers.common['Authorization'] = 'HDU ' + res.token
export function getInfo(token) {
  return request({
    url: '/auth/me',
    method: 'get'
    // headers: {
    //   Authorization: token
    // },
    // params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
